#ifndef ZONE_H
#define ZONE_H

#include <QObject>
#include <QString>
#include <QTime>
#include <QMap>
#include <QPair>

class Zone : public QObject
{
  Q_OBJECT
  Q_PROPERTY(QString name READ name)
  Q_PROPERTY(int trionId READ trionId WRITE setTrionId)
  Q_PROPERTY(QString eventName READ eventName WRITE setEventName)
  Q_PROPERTY(QTime eventTime READ eventTime WRITE setEventTime)
  Q_PROPERTY(int level READ level)
public:
  explicit Zone(QObject *parent = 0);
  Zone(const Zone &z);
  Zone& operator=(const Zone &z);

  QString name() const;
  int trionId() const;
  QString eventName() const;
  QTime eventTime() const;
  int level() const;

  bool operator<(const Zone &z) const;

  static QMap<int, QPair<QString, int> > zoneList();

  bool operator==(const Zone& z) const;

signals:

public slots:
  void setTrionId(int id);
  void setEventName(const QString &str);
  void setEventTime(const QTime &time);

private:
  QString p_name;
  int p_trionId;
  QString p_eventName;
  QTime p_eventTime;
  int p_level;
};

#endif // ZONE_H
